package com.edunera;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import android.widget.TextView;
import com.edunera.models.edu_comments;
import com.edunera.models.edu_courses;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: Soyhan
 * Date: 03.06.2013
 * Time: 00:43
 * To change this template use File | Settings | File Templates.
 */
public class FragDetail extends Fragment {
    LayoutInflater inflater;
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_course_detail, null);

        this.inflater = getLayoutInflater(savedInstanceState);
        edu_courses course = (edu_courses) getArguments().getSerializable("details");

        TextView course_name = (TextView) view.findViewById(R.id.course_name);
        course_name.setText(course.name);

        TextView shortdescription= (TextView) view.findViewById(R.id.short_description);
        shortdescription.setText("In short:"+course.short_description);

        TextView description= (TextView) view.findViewById(R.id.description);
        description.setText("Description:"+course.description);

        TextView url= (TextView) view.findViewById(R.id.link);
        url.setText(course.url);
        url.setMovementMethod(LinkMovementMethod.getInstance());

        return view;

    }
}
